package com.cm.sys.framework.application;

/***
 * 
 * @author yxq18
 * @date 2019/12/11
 */
public enum ApiResponseCode {
    OTHER(-2, ""), 
    ERROR(-1, "系统错误"), 
    SUCCESS(200, "成功"), 
    NO_DATA(210, "暂无数据"), 
    CODE_LOGIN(1003, "请登录"),
    NOT_FOUND(1004, "不存在符合请求条件的接口"), 
    PARAM_NEED(1006, "缺少必填参数"), 
    DEL_FAIL(1005, "数据删除失败"),
    NO_DEL_DATA(1007, "没有找到被删除数据"), 
    NO_TOKEN(211, "token为空"), 
    LOGIN_ERROR(212, "登录失败"), 
    VAILDATE_ERROR(1001, "数据验证错误"),
    RPC_ERROR(1002, "远程调用异常"), 
    NO_IP(1002, "IP不允许访问"), 
    JOIN_MORE(1003, "查询关联表过多"), 
    SQL_ERROR(1005, "sql异常"),
    TYPE_CONVERSION_EXCEPTION(1004, "类型转换异常"), 
    TOKEN_ERROR(1006, "token错误"), 
    TOKEN_EXP(1006, "token过期"),
    PASSWORD_ERROR(1007, "账号或密码错误"), 
    MENUID_ERROR(2001, "根菜单不允许删除"), 
    MENUPARETN_ERROR(2002, "该菜单下有子菜单不允许删除"),
    MENUPARETNORSUNID_ERROR(2003, "不允许将根菜单该为子菜单"), 
    MENUROTE_ERROR(2000, "菜单路由重复"), 
    TOKEN_DELETE(1008, "TOKEN已经被删除"),
    HTTP_ERROR(1010, "HTTP远程调用异常"), 
    MUNEID_EOOR(2004, "菜单id不能为空"), 
    MENULIST_ERROR(2003, "没有查到菜单"),
    MENUPARENTNAME_EOOR(2008, "菜单名不能相同"), 
    MUNEINSERTTOID_EOOR(2006, "保存失败"),
    CONNECT_ERROR(2009,"连接推送服务出错"),
    CONNECT_SUCCESS(200,"连接推送服务成功"),
    NO_SESSION(2010,"无客户端连接");
	
	
    int code;
    String message;

    private ApiResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
